<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateNewsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('news', function (Blueprint $table) {
            $table->increments('id');
            $table->integer("category_id")->default(0)->comment='所属分类';
            $table->string("title")->comment='标题';
            $table->string("meta_keyword")->default('')->comment='页面关键字';
            $table->string("meta_description")->default('')->comment='页面描述';
            $table->string("page_image")->default('')->comment='页面缩略图';
            $table->string("summarty")->default('')->comment='页面摘要';
            $table->text("content")->comment='正文';
            $table->integer("views")->default(0)->comment='浏览量';
            $table->integer("user_id")->default(0)->comment='用户ID';
            $table->integer("status")->default(0)->comment='用户ID';

            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('news');
    }
}
